package com.elmcode.server.controller.app;

import com.elmcode.server.service.MenuService;
import com.elmcode.server.utils.Result;
import com.elmcode.server.vo.MenuVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@Api(tags = "菜单接口")
@RequestMapping("app/shop")
public class MenuController {

    @Autowired
    MenuService menuService;

    @GetMapping("/{shopId}/food")
    @ApiOperation("获取菜单数据接口")
    @ResponseBody
    public Result selectMenuInfo(){

        MenuVo menuVo = menuService.selectMenuInfo();
        return Result.ok("查询成功",menuVo.getShopInfoVos());
    }


}

